// DlgIeplorer.cpp : implementation file
//

#include "stdafx.h"
#include "dlltool.h"
#include "DlgIeplorer.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgIeplorer dialog


CDlgIeplorer::CDlgIeplorer(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgIeplorer::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgIeplorer)
	m_csUrl = _T("http://jx2.xoyo.com/kehuduan/index.shtml");
	//}}AFX_DATA_INIT
}


void CDlgIeplorer::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgIeplorer)
	DDX_Text(pDX, IDC_EDIT_URL, m_csUrl);
//	DDX_Control(pDX, IDC_EXPLORER1, m_wbIexplore);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgIeplorer, CDialog)
	//{{AFX_MSG_MAP(CDlgIeplorer)
	ON_WM_CREATE()
	ON_BN_CLICKED(IDC_BN_OPEN_URL, OnBnOpenUrl)
	ON_WM_TIMER()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgIeplorer message handlers
int CDlgIeplorer::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here
//	RECT rc;

//	::GetClientRect(this->m_hWnd,&rc);
	//m_ieweb.Create(this->m_hWnd,&rc,LPCTSTR("ShockwaveFlash.ShockwaveFlash"),WS_CHILD | WS_VISIBLE);
//	m_ieweb.CreateControl(clsid2, LPCTSTR("ShockwaveFlash.ShockwaveFlash"), WS_CHILD | WS_VISIBLE, rc, this,IDC_EXPLORER2);
	return 0;
}
bool bflag = true;
unsigned int m_nTimer;
void CDlgIeplorer::OnBnOpenUrl() 
{
	// TODO: Add your control notification handler code here
	//UpdateData();
	//SetTimer(65,300000,0);
	//m_nTimer = SetTimer(66,20000,0);
	//m_wbIexplore.Navigate(m_csUrl.GetBuffer(0),0,0,0,0);
	//bflag = false;
}
//KillTimer(m_nTimer);   
void CDlgIeplorer::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	//if(nIDEvent == 65)
	//{
	//	m_wbIexplore.Navigate(m_csUrl.GetBuffer(0),0,0,0,0);
	//}
	/*
	if(nIDEvent == 66)
	{
		SetTimer(67,600000,0);
		m_wbIexplore.Navigate("",0,0,0,0);
	}
	if(nIDEvent == 67)
	{
		m_wbIexplore.Navigate("",0,0,0,0);
	}
	*/
	CDialog::OnTimer(nIDEvent);
}
